package com.lening.security.controller;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.lening.common.base.BaseController;
import com.lening.security.dto.PathDTO;
import com.lening.security.po.PathPO;
import com.lening.security.service.IPathService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author 赵子豪
 * @date 2024年06月04日 09时08分28秒
 * 巡更路线
 */
@Slf4j
@RestController
@RequestMapping("path")
public class PathController extends BaseController<PathPO, PathDTO, IPathService> {
    @Autowired
    private IPathService iPathService;
    //分页
    @GetMapping("pathpage")
    public Page<PathDTO> pathpage(PathDTO pathDTO){
        Page<PathDTO> pathpage = iPathService.pathpage(pathDTO);
        return pathpage;
    }

    //记录
    @GetMapping("pathsrecordpage")
    public Page<PathDTO> pathsrecordpage(PathDTO pathDTO) {
        Page<PathDTO> pathsrecordpage = iPathService.pathsrecordpage(pathDTO);
        return pathsrecordpage;
    }

}